home *** CD-ROM | disk | FTP | other *** search
/ Old Testament Foundatiosn with Philip Yancey / Old Testament Foundatiosn with Philip Yancey - Disc 2.iso / pc / instaldi / oldtest.exe / oldtest.DXR / 00001.ls next >
Encoding:
Text File  |  1996-07-10  |  1.5 KB  |  47 lines

  1. on startMovie
  2.   global gIntroFile, gOnIBM, gNotesDirectoryPath, gSaveItemsDirectoryPath, gMacBiblePath, gMyCD, gOneLevelUpDirectory
  3.   identifyPlatform()
  4.   if gOnIBM then
  5.     set gMyCD to checkDrive("SKYMEDIA.TXT")
  6.     set gIntroFile to gMyCD & "\data\pkintro.dir"
  7.     set gNotesDirectoryPath to the pathName & "NOTES"
  8.     set gSaveItemsDirectoryPath to the pathName & "SAVEFILE"
  9.   else
  10.     set gIntroFile to "Old Testament:data:pkintro.dir"
  11.     set gNotesDirectoryPath to the pathName & "NOTES"
  12.     set gSaveItemsDirectoryPath to the pathName & "SAVEFILE"
  13.     createUpOneLevelPathName()
  14.     set gMacBiblePath to gOneLevelUpDirectory & ":macBible 3.0:macBible ¬Æ 3.2.1"
  15.   end if
  16. end
  17.  
  18. on checkDrive theFileName
  19.   repeat with i = 67 to 90
  20.     set drive to numToChar(i)
  21.     set thisPath to string(drive & ":\" & theFileName)
  22.     set myFile to FileIO(mnew, "read", thisPath)
  23.     if objectp(myFile) then
  24.       myFile(mdispose)
  25.       return drive & ":"
  26.       exit
  27.     end if
  28.   end repeat
  29.   alert("Please check that" && QUOTE & theFileName & QUOTE & "is on your CD Drive.")
  30. end
  31.  
  32. on createUpOneLevelPathName
  33.   global gOneLevelUpDirectory
  34.   set gOneLevelUpDirectory to the pathName
  35.   set the itemDelimiter to ":"
  36.   set totalItems to the number of items in gOneLevelUpDirectory
  37.   repeat with x = 1 to totalItems
  38.     if item x of gOneLevelUpDirectory = "Old Testament" then
  39.       set myLastItem to x
  40.       next repeat
  41.     end if
  42.     nothing()
  43.   end repeat
  44.   delete item myLastItem to totalItems of gOneLevelUpDirectory
  45.   set the itemDelimiter to ","
  46. end
  47.